package com.shxy.web;

import com.shxy.service.IUserService;
import com.shxy.ui.CommonReturn;
import com.shxy.ui.LoginForm;
import lombok.extern.java.Log;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.util.*;

@RestController
@RequestMapping("/user")
@Log
public class UserController {
    @Autowired
    private IUserService userService;

    @PostMapping("/login")
    private String login(LoginForm loginForm){
        log.info(loginForm.getName() + ":" + loginForm.getPassword() + ":" + loginForm.getRole());
        return "success";
    }
}
